import axios from "@/http/http.js";
// 封装获取医疗器械信息接口
export const medicalDevicesFindAPI = (data) => {
    return axios({
        url: '/medicalDevice/find',
        method: 'post',
        data
    })
};

// 封装修改医疗器械信息接口
export const medicalDeviceUpdateAPI = (data) => {
    return axios({
        url: '/medicalDevice/update',
        method: 'put',
        data
    })
};

// 封装添加医疗器械信息接口
export const medicalDeviceAddAPI = (data) => {
    return axios({
        url: '/medicalDevice/add',
        method: 'post',
        data
    })
};

// 封装删除医疗器械信息接口
export const medicalDeviceDeleteAPI = (data) => {
    return axios({
        url: '/medicalDevice/delete',
        method: 'put',
        data,
        headers: { "content-type": "application/x-www-form-urlencoded" }
    })
};


// 封装获取已有医疗器械下拉框接口
export const deviceDropDownFindAPI = (institutionId) => {
    return axios({
        url: `/medicalDevice/findDeviceDropDown/${institutionId}`,
        method: 'post',
        institutionId
    })
};

// 封装获取未有医疗器械下拉框接口
export const deviceDropDownWithoutFindAPI = (institutionId) => {
    return axios({
        url: `/medicalDevice/findDeviceDropDownWithout/${institutionId}`,
        method: 'post',
        institutionId
    })
};